define(function(require, exports, module) {
	"require:nomunge,exports:nomunge,module:nomunge";

	var app = require('mokit/app');
	var ProjectListView = require('../views/works-info');
	var commonUtils = require('../common/utils');
	var model = require('../models/Works');

	/**
	 * 社友录页面控制器
	 */
	return app.controller.create({
		isSetting: true,
		/**
		 * 默认action
		 */
		index: function(context) {
			var self = this;
			var id = context.routeData.id;
			model.getInfo(id, function(){
				self.setView(new ProjectListView({
					model: model
				}));
			});
		},
		
		//收藏作品
		collect: function(context, id){
			model.collect(function(rs){
				alert(rs.msg);
			});			
		}
	});

});